<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ page session="false" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page pageEncoding="UTF-8" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<c:url value='/resources/css/style.css' />" media="all" />

	<script type="text/javascript">
   
		jQuery(document).ready(function() {			
			
			$('#loader').hide();
			$('#show_heading').hide();			
			
		});

	</script>

</head>
<body>
<div id="data_content">
<img src="<c:url value='/resources/css/images/loader.gif' />" style="margin-top: 8px; float: left" id="loader" alt="" />
	<table style="border: 1px solid; width: 625px;">
		<thead style="background: #181717">
			<tr>
				<th>Thai Name</th>
				<th>Eng Name</th>
				<th colspan="3"></th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${carBrands}" var="carBrand">
				<c:url var="editCarBrand" value="carBrands/edit.html?id=${carBrand.id}" />
				<c:url var="deleteCarBrand" value="/carBrands/delete.html?id=${carBrand.id}" />
				<tr>
					<td><c:out value="${carBrand.nameThai}" /></td>
					<td><c:out value="${carBrand.nameEng}" /></td>
					<td><a onclick="javascript:getPagePreview('${editCarBrand}')">Edit</a></td>
					<td><a href="${deleteCarBrand}">Delete</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	</div>

	<c:if test="${empty carBrands}">
 There are currently no carBrands in the list. <a href="${addCarBrand}">Add</a> a Brand.
</c:if>

</body>
</html>